<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<title>网站列表 - 后台管理</title>
<link rel="shortcut icon" type="image/x-icon" href="{{asset('favicon.ico')}}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.min.css">
</head>
  
<body>
<div class="container-fluid">
  
  <div class="row">
    
    <div class="col-lg-12">
      <div class="card">
        <header class="card-header"><div class="card-title">网站列表</div></header>
        <div class="card-body">
          <div class="card-search mb-2-5">
            <form class="search-form" method="get" action="" role="form">              
              <div class="row">
                <div class="col-md-4">
                  <div class="row">
                    <div class="col-sm-8">
                      <input type="text" class="form-control pull-left" name="search" value="@if($search!=''){{$search}}@endif" placeholder="请输入任务名称" />
                    </div>
                  </div>
                </div>
                <div class="col-md-4">
                  <button type="submit" class="btn btn-primary me-1">搜索</button>
                  <button type="reset" class="btn btn-default">重置</button>
                </div>
              </div>              
            </form>
          </div>
          <div class="table-responsive">
            <table class="table table-bordered align-middle text-center table-hover">
              <thead class="table-light">
                <tr>
                  <th>
                    <div class="form-check">
                      <input class="form-check-input" type="checkbox" id="check-all">
                      <label class="form-check-label" for="check-all"></label>
                    </div>
                  </th>
                  <th>编号</th>                  
                  <th>名字</th>
                  <th>图片</th>
                  <th>简介</th>
                  <th>地址</th>
                  <th>时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                @foreach ($websites as $website)
                <tr>
                  <td>
                    <div class="form-check">
                      <input type="checkbox" class="form-check-input ids" name="ids[]" value="1" id="ids-1">
                      <label class="form-check-label" for="ids-1"></label>
                    </div>
                  </td>
                  <td>{{$website->id}}</td>
                  <td>{{$website->web_name}}</td>
                  <td>
                    <img src="{{url($website->pic_url)}}" class="rounded mx-auto d-block" alt="" width="300px" height="150px">
                  </td>
                  <td>{{$website->desc}}</td>
                  <td>
                    {{$website->web_url}}<br/>
                    {{$website->web_url_cn}}<br/>
                    {{$website->github}}<br/>
                    {{$website->gitee}}<br/>
                  </td>
                  <td>{{date('Y-m-d H:i', $website->add_time)}}</td>
                  <td>
                    <div class="btn-group btn-group-sm">
                      <a class="btn btn-default" href="{{url('admin/add_website/' . $website->id)}}" data-bs-toggle="tooltip" title="编辑"><i class="mdi mdi-pencil"></i></a>
                      <a class="btn btn-default" href="{{url('admin/del_website/' . $website->id)}}" data-bs-toggle="tooltip" title="删除"><i class="mdi mdi-window-close"></i></a>
                    </div>
                  </td>
                </tr>
                @endforeach
              </tbody>
            </table>
          </div>
          <div class="pagination">
            {{ $websites->links('vendor.pagination.bootstrap-4')}}
          </div>
          
        </div>
      </div>
    </div>
        
  </div>
  
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
</body>
</html>